package com.neusoft;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class Servlet01
 */
@WebServlet("/Servlet01")
public class Servlet01 extends HttpServlet {
	private static final long serialVersionUID = 1L;

	/**
	 * @see HttpServlet#HttpServlet()
	 */
	public Servlet01() {
		super();
		// TODO Auto-generated constructor stub
	}

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		
		        //设置请求信息的字符编码（必须在使用request之前进行设置）
		        request.setCharacterEncoding("utf-8");
		        //使客户端浏览器并根据不同的MIME调用浏览器内不同的程序嵌入模块来处理相应的数据。
		        response.setContentType("text/html;charset=utf-8");
		        //设置响应信息的字符编码（必须在创建响应输出流之前进行设置）
		        response.setCharacterEncoding("utf-8");
		        //获取客户端提交参数
		       
		       
		   
		
		//System.out.println();
		PrintWriter pw = response.getWriter();
		
		pw.print("<h1>吃掉凉子rioko姐姐</h1>");
		pw.print("<h1>吃掉肉扣热热子姐姐</h1>");
		
		
		response.getWriter().append("Served at: ").append(request.getContextPath());
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
	 *      response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
